interface TcomponentItem {
  componentName: string; //控件的名称
  componentType: string; //控件的类型
  code: string; //控件的唯一code
  showFieldList: string[]; //该控件可修改的props字段
  icon: string; //控件的icon
  props: any; //对象 props的默认值
  type: string;
}

const baseControl: TcomponentItem[] = [
  {
    componentName: '单行文本',
    componentType: 'TEXT',
    code: 'TEXT',
    icon: 'icon-danhangwenben',
    showFieldList: ['validate', 'textMax', 'placeholder'],
    props: {
      placeholder: '请输入文字',
    },
    type: '0',
  },
  {
    componentName: '编号通用',
    componentType: 'NUMBER-UNIVERSAL',
    code: 'NUMBER-UNIVERSAL',
    icon: 'icon-danhangwenben',
    showFieldList: ['validate', 'textMax', 'placeholder'],
    props: {
      placeholder: '系统自动生成',
    },
    type: '0',
  },
  {
    componentName: '多行文本',
    componentType: 'TEXT_AREA',
    code: 'TEXT_AREA',
    icon: 'icon-duohangwenben',
    showFieldList: ['textMax', 'placeholder'],
    props: {
      placeholder: '请输入文字',
    },
    type: '0',
  },
  {
    componentName: '数字',
    componentType: 'NUMBER',
    code: 'TEXT_NUMBER',
    icon: 'icon-shuzi',
    showFieldList: ['textMax', 'placeholder'],
    props: {
      placeholder: '请输入数字',
    },
    type: '0',
  },
  {
    componentName: '金额',
    componentType: 'MONEY',
    code: 'TEXT_MONEY',
    icon: 'icon-jine',
    showFieldList: ['textMax', 'placeholder'],
    props: {
      placeholder: '请输入金额',
    },
    type: '0',
  },

  {
    componentName: '日期',
    componentType: 'DATE',
    code: 'DATE',
    icon: 'icon-calendar',
    showFieldList: ['placeholder', 'dateFormat', 'showTime'],
    props: {
      placeholder: '请输入日期',
      dateFormat: 'YYYY-MM-DD HH:mm:ss', // 时间格式
      showTime: true, // 是否为带日期的选择器
      valueFormat: 'x', // 传给后端的时间格式(默认为时间戳)
    },
    type: '0',
  },

  {
    componentName: '日期范围',
    componentType: 'DATE_RANGE',
    code: 'DATE_RANGE',
    icon: 'icon-calendar',
    showFieldList: ['placeholder', 'dateFormat', 'showTime'],
    props: {
      placeholder: '请输入日期',
      format: 'YYYY-MM-DD HH:mm:ss', // 时间格式
      showTime: true, // 带日期的选择器
      valueFormat: 'x', // 传给后端的时间格式(默认为时间戳)
    },
    type: '0',
  },
  {
    componentName: '下拉选择框',
    componentType: 'SELECT',
    code: 'SELECT',
    icon: 'icon-xialaxuanze',
    showFieldList: ['placeholder', 'selectOptions'],
    props: {},
    type: '0',
  },
  {
    componentName: '下拉选择框',
    componentType: 'DROP_DOWN',
    code: 'DROP_DOWN',
    icon: 'icon-xialaxuanze',
    showFieldList: ['placeholder', 'selectOptions'],
    props: {},
    type: '0',
  },
  {
    componentName: '单选框',
    componentType: 'RADIO',
    code: 'RADIO',
    icon: 'icon-danxuankuang',
    showFieldList: ['placeholder', 'radioOptions'],
    props: {},
    type: '0',
  },
  {
    componentName: '多选框',
    componentType: 'CHECK_BOX',
    code: 'CHECK_BOX',
    icon: 'icon-danxuankuang',
    showFieldList: ['max', 'checkOptions'],
    props: {
      // options:{}
    },
    type: '0',
  },

  {
    componentName: '产品',
    componentType: 'TABLE',
    code: 'TABLE',
    icon: 'icon-biaoge',
    showFieldList: ['placeholder'],
    props: {},
    type: '0',
  },

  {
    componentName: '附件',
    componentType: 'FILE',
    code: 'FILE',
    icon: 'icon-fujian',
    showFieldList: ['placeholder'],
    props: {},
    type: '0',
  },

  {
    componentName: '部门',
    componentType: 'DEPARTMENT',
    code: 'DEPARTMENT',
    icon: 'icon-yuangong',
    showFieldList: ['placeholder'],
    props: {},
    type: '0',
  },
  {
    componentName: '岗位',
    componentType: 'POST',
    code: 'POST',
    icon: 'icon-yuangong',
    showFieldList: ['placeholder'],
    props: {},
    type: '0',
  },
  {
    componentName: '客户名称',
    componentType: 'CLIENT',
    code: 'CLIENT',
    icon: 'icon-yuangong',
    showFieldList: ['placeholder'],
    props: {},
    type: '0',
  },
  {
    componentName: '客户编号',
    componentType: 'CLIENT_NUMBER',
    code: 'CLIENT_NUMBER',
    icon: 'icon-yuangong',
    showFieldList: ['placeholder'],
    props: {},
    type: '0',
  },
  {
    componentName: '联系人姓名',
    componentType: 'CONTACT_NAME',
    code: 'CONTACT_NAME',
    icon: 'icon-yuangong',
    showFieldList: ['placeholder'],
    props: {},
    type: '0',
  },
  {
    componentName: '联系地址',
    componentType: 'ADDRESS',
    code: 'ADDRESS',
    icon: 'icon-yuangong',
    showFieldList: ['placeholder'],
    props: {},
    type: '0',
  },
];

export default baseControl;
